class IndexSetting {
  ///志愿者投稿
  int? volunteerContribution;

  ///赛程
  int? gameSchedule;

  ///商城
  int? shop;

  ///积分
  int? integral;

  ///活动
  int? activity;

  ///签到
  int? signIn;

  ///反馈
  int? feedBack;

  ///认证
  int? authentication;

  ///客服
  int? service;

  ///评论
  int? gameComment;

  ///是否停止服务
  int? globalStop;

  ///是否暂停服务
  int? globalPause;

  ///操作手册
  int? opManual;

  ///操作视频
  int? opVideo;
  IndexSettingOptions? opManualOptions;
  IndexSettingOptions? opVideoOptions;

  ///邮箱反馈
  int? emailFeedback;

  ///客服热线
  int? customerHotline;

  ///客服热线备用
  int? reserveCustomerHotline;
//扫一扫
  int? scan;

// 8:
// "email_feedback" -> 1
// 29:
// "email_feedback_options" -> null
// 30:
// "customer_hotline" -> 1
// 31:
// "customer_hotline_options" -> null

  IndexSetting(
      {this.volunteerContribution,
      this.gameSchedule,
      this.shop,
      this.integral,
      this.activity,
      this.signIn,
      this.feedBack,
      this.authentication,
      this.service,
      this.gameComment,
      this.globalPause,
      this.globalStop,
      this.opManual,
      this.opVideo,
      this.opManualOptions,
      this.opVideoOptions,
      this.emailFeedback,
      this.scan,
      this.customerHotline,
      this.reserveCustomerHotline});

  factory IndexSetting.fromJson(Map<String, dynamic> json) => IndexSetting(
        volunteerContribution: json['volunteer_contribution'] as int?,
        gameSchedule: json['game_schedule'] as int?,
        shop: json['shop'] as int?,
        integral: json['integral'] as int?,
        activity: json['activity'] as int?,
        signIn: json['sign_in'] as int?,
        feedBack: json['feed_back'] as int?,
        authentication: json['authentication'] as int?,
        service: json['service'] as int?,
        gameComment: json['game_comment'] as int?,
        globalPause: json['global_pause'] as int?,
        globalStop: json['global_stop'] as int?,
        opVideo: json['op_video'] as int?,
        opManual: json['op_manual'] as int?,
        scan: json['scan'] as int?,
        opManualOptions: json['op_manual_options'] == null
            ? null
            : IndexSettingOptions.fromJson(
                json['op_manual_options'] as Map<String, dynamic>),
        opVideoOptions: json['op_video_options'] == null
            ? null
            : IndexSettingOptions.fromJson(
                json['op_video_options'] as Map<String, dynamic>),
        emailFeedback: json['email_feedback'] as int?,
        reserveCustomerHotline: json['reserve_customer_hotline'] as int?,
        customerHotline: json['customer_hotline'] as int?,
        // customerHotlineOptions: json['customer_hotline_options'] as int?,
      );

  Map<String, dynamic> toJson() => {
        'volunteer_contribution': volunteerContribution,
        'game_schedule': gameSchedule,
        'shop': shop,
        'integral': integral,
        'activity': activity,
        'sign_in': signIn,
        'feed_back': feedBack,
        'authentication': authentication,
        'service': service,
        'game_comment': gameComment,
        'global_pause': globalPause,
        'global_stop': globalStop,
        'op_video': opVideo,
        'op_manual': opManual,
        'scan': scan,
        'op_video_options': opVideoOptions?.toJson(),
        'op_manual_options': opManualOptions?.toJson(),
        'email_feedback': emailFeedback,
        // "email_feedback_options": emailFeedbackOptions,
        'customer_hotline': customerHotline,
        'reserve_customer_hotline': reserveCustomerHotline
      };
}

class IndexSettingOptions {
  String? url;

  String? urlEn;

  IndexSettingOptions({
    this.url,
    this.urlEn,
  });

  factory IndexSettingOptions.fromJson(Map<String, dynamic> json) =>
      IndexSettingOptions(
        url: json['url'] as String?,
        urlEn: json['en_url'] as String?,
      );

  Map<String, dynamic> toJson() => {
        'url': url,
        'en_url': urlEn,
      };
}
